import { create } from "zustand";

// 定义类型
export interface BasicInfo {
  enName?: string;
  cnName?: string;
  email?: string;
  mobile?: string;
}

export interface VehInfo {
  vehType?: string; // 假设 vehType 是 string 类型，具体根据你的定义修改
  lpnId?: string;
  lpnNo?: string;
  octopusNo?: string;
}

interface ParkingInfo {
  carParkId?: string; // 假设 carParkId 是 string 类型，具体根据你的定义修改
  carParkName?: string;
  entryDate?: string; // 假设 passType 是 string 类型，具体根据你的定义修改
  parkingPeriod?: string; // 假设 parkingPeriod 是 string 类型，具体根据你的定义修改
  payAmount?: number; // 假设 payAmount 是 number 类型
}

export interface VipBookingData {
  basicInfo: BasicInfo;
  vehInfo: VehInfo;
  parkingInfo: ParkingInfo;
}

interface VipBookingStoreState {
  vipBookingData: VipBookingData;
  setVipBookingData: (vipBookingData: VipBookingData) => void;
}

const useVipBookingStore = create<VipBookingStoreState>((set) => ({
  vipBookingData: {
    basicInfo: {},
    vehInfo: {},
    parkingInfo: {},
  },
  setVipBookingData: (vipBookingData) => set({ vipBookingData }),
}));

export default useVipBookingStore;
